____________________________________________________
----------------------------------------------------
UOL: Shattered Legacy Networking Protocol Map

Credits: Tamino1791 (codemonkey@dork.com)
----------------------------------------------------

Internal protocol
____________________________________________________



0xFE ->
    Packets:

        DISPLAY_SKILL_LIST 0x6F
            0x00
            0x01
            0x00
            int Magic defense // *100
            int Battle defense // *100
            int Stealing // *100
            int Hiding // *100
            int First Aid // *100 
            int Detect Trap // *100
            int Peek // *100
            int Magic //*100
            int Melee // *100
            int Ranged Weapons // *100

        PLAYER_DEATH_MSG 0x4B
            0x00
            0x01
            0x01 ?
            ~

        GROUPED_MSG 0x6E
            0x00
            0x01
            0x01 ?
            ~

        CHARACTER_NOT_EXIST 0xB7
            0x00
            0x01
            0x01 ?
            ~

        CLIENT_OUTDATED 0x44
            0x00
            0x01
            0x01 ?
            ~

        GETOBJ_FAIL_MSG 0x45
            0x00
            0x01
            0x00 - 0x01 // 0x00 pick up, 0x01 steal messages
            ~

        LOCATION_UPDATE 0x3F
            0x00
            0x01
            0x00 
            int xloc
            int yloc
            BYTE direction // 0x00 N, 0x01 NE, 0x02 E, 0x03 SE, 0x04 S, 0x05 SW, 0x06 W, 0x07 NW
            BYTE z

        BAD_PASSWORD 0xB7
            0x00
            0x01
            ~

        ARRIVE_MSG 0xA6 // This displays "name has arrived" and writes empty file, "name"
            BYTE 0x00
            BYTE 0x01
            BYTE[8] 0x00 // unknowns, possible player ID and others
            STRING name
            ~






UNKNOWN 0x16
    0x00 
    0x01
    ~

UNKNOWN 0x1F
    0x00
    0x01
    ~

UNKNOWN 0x32 // crashes client
    0x00
    0x01
    ~

UNKNOWN 0x33
    0x00
    0x01
    ~

UNKNOWN 0x35
    0x00
    0x01
    ~

UNKNOWN 0x36 // causes screen to redraw, freezes client if second packet sent
    0x00
    0x01
    BYTE[4] player_ID // init player ID?
    

UNKNOWN 0x37
    0x00
    0x01
    ~

UNKNOWN 0x3A // crashes client if sent directly after packet 0x36?
    0x00
    0x01
    ~

UNKNOWN 0x3C
    0x00
    0x01
    ~

UNKNOWN 0x3D
    0x00
    0x01
    ~

UNKNOWN 0x3E // character init packet, NPC...?
    0x00
    0x01
    BYTE[4] player_ID // player unique number, nbo - hbo in player.dat
    0x00 unknown
    BYTE gender // 00 male, 01 female
    0x00 unknown
    int x
    int y
    0x00 unknown // "failed to find referenced area" if other than 0x00?
    0x00 unknown // "failed to find referenced area" if other than 0x00?
    BYTE direction
    BYTE z
 
// notes: send FE 36 00 01 01 02 03 04
//             FE 3E 00 01 01 02 03 04 00 01 00 00 07 00 0A 00 00 02 00

UNKNOWN 0x3F // movement packet for player?
    0x00
    0x01
    0x00
    int x
    int y
    BYTE direction
    BYTE z
// Interesting locations:
// FE 3F 00 01 00 02 03 02 FC 03 00
// FE 3F 00 01 00 00 3F 02 1A 03 00
// FE 3F 00 01 00 01 66 02 CD 03 00
// FE 3F 00 01 00 00 2F 02 A0 03 00
// FE 3F 00 01 00 00 3E 03 40 03 00
// FE 3F 00 01 00 00 5F 03 3B 03 00

UNKNOWN 0x40
    0x00
    0x01
    ~
UNKNOWN 0x41
    0x00
    0x01
    ~

UNKNOWN 0x42
    0x00
    0x01
    ~

UNKNOWN 0x43
    0x00
    0x01
    ~

UNKNOWN 0x46
    0x00
    0x01
    ~

UNKNOWN 0x47
    0x00
    0x01
    ~

UNKNOWN 0x48
    0x00
    0x01
    ~

UNKNOWN 0x49
    0x00
    0x01
    ~

UNKNOWN 0x4C
    0x00
    0x01
    ~

UNKNOWN 0x4D
    0x00
    0x01
    ~

UNKNOWN 0x4E // investigate: crashes with FE 4E 00 01 01 00 5F 03 3B 03 00
    0x00
    0x01
    ~

UNKNOWN 0x50
    0x00
    0x01
    ~

UNKNOWN 0x51
    0x00
    0x01
    ~

UNKNOWN 0x63
    0x00
    0x01
    ~

UNKNOWN 0x65
    0x00
    0x01
    ~

UNKNOWN 0x67
    0x00
    0x01
    ~

UNKNOWN 0x68 // freezes client
    0x00
    0x01
    ~

UNKNOWN 0x6D
    0x00
    0x01
    ~

UNKNOWN 0x70
    0x00
    0x01
    ~

UNKNOWN 0x71
    0x00
    0x01
    ~

UNKNOWN 0x96
    0x00
    0x01
    ~

UNKNOWN 0x97 // crashes client
    0x00
    0x01
    ~

UNKNOWN 0x98 // crashes client
    0x00
    0x01
    ~

UNKNOWN 0x99 // crashes client
    0x00
    0x01
    ~

UNKNOWN 0x9A // "tried to update art less than 0 or greather than 65535"
    0x00
    0x01
    ~

UNKNOWN 0x9B
    0x00
    0x01
    ~

UNKNOWN 0x9C
    0x00
    0x01
    ~

UNKNOWN 0x9D // crashes client
    0x00
    0x01
    ~

UNKNOWN 0xA5 // scrolls non-bark chat
    0x00
    0x01
    ~

UNKNOWN 0xA8
    0x00
    0x01
    ~

UNKNOWN 0xA9
    0x00
    0x01
    ~

UNKNOWN 0xB4
    0x00
    0x01
    ~

UNKNOWN 0xB5
    0x00
    0x01
    ~

UNKNOWN 0xB8
    0x00
    0x01
    ~
// FE B8 00 01 00 01 66 02 CD 00 00


// E0?


_____________________________________________________
-----------------------------------------------------

External protocol
_____________________________________________________

Examples:

Spellbook gump request
FE 17 00 06 43 00

Bulletin board read request
FE 17 00 0A 20 6C 69 73 74 00

Chat message
FE 06 00 0E(size+10) 00 00 F8 38 00 string

Movement
FE 04 00 06 04 03
// 4th byte? 5th byte is direction, last byte is step count?
// 80 added to direction, running?
             
    
 
                    